package com.jhgsys.internal.base.service;

import com.jhgsys.internal.base.dto.BaseCautionaryLessonDto;
import com.jhgsys.internal.base.entity.BaseCautionaryLesson;
import com.jhgsys.internal.common.entity.FebsResponse;
import com.jhgsys.internal.common.entity.QueryRequest;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jhgsys.internal.common.exception.FebsException;

import java.util.List;

/**
 *  Service接口
 *
 * @author zhangwei
 * @date 2024-09-05 09:48:17
 */
public interface IBaseCautionaryLessonService extends IService<BaseCautionaryLesson> {
    /**
     * 查询（分页）
     * @author zhangwei
     * @date 2024-09-05 09:48:17
     * @param request QueryRequest
     * @param baseCautionaryLesson baseCautionaryLesson
     * @return IPage<BaseCautionaryLesson>
     */
    IPage<BaseCautionaryLesson> findBaseCautionaryLessonPage(QueryRequest request, BaseCautionaryLesson baseCautionaryLesson);

    /**
     * 查询（所有）
     * @author zhangwei
     * @date 2024-09-05 09:48:17
     * @param baseCautionaryLesson baseCautionaryLesson
     * @return List<BaseCautionaryLesson>
     */
    List<BaseCautionaryLesson> findBaseCautionaryLessonList(BaseCautionaryLesson baseCautionaryLesson);

    /**
    * 根据ID查询
    * @author zhangwei
    * @date 2024-09-05 09:48:17
    * @param id
    * @return BaseCautionaryLesson
    */
    BaseCautionaryLessonDto findBaseCautionaryLessonById(String id);

    /**
     * 新增
     * @author zhangwei
     * @date 2024-09-05 09:48:17
     * @param baseCautionaryLesson baseCautionaryLesson
     */
    void createBaseCautionaryLesson(BaseCautionaryLesson baseCautionaryLesson);

    /**
     * 修改
     * @author zhangwei
     * @date 2024-09-05 09:48:17
     * @param baseCautionaryLesson baseCautionaryLesson
     */
    void updateBaseCautionaryLesson(BaseCautionaryLesson baseCautionaryLesson);

    /**
     * 逻辑删除
     * @author zhangwei
     * @date 2024-09-05 09:48:17
     * @param baseCautionaryLesson baseCautionaryLesson
     * @param baseCautionaryLessonIds baseCautionaryLessonIds
     */
    void deleteBaseCautionaryLesson(BaseCautionaryLesson baseCautionaryLesson,String baseCautionaryLessonIds);

    /**
    * 物理删除
    * @author zhangwei
    * @date 2024-09-05 09:48:17
    * @param baseCautionaryLessonIds baseCautionaryLessonIds
    */
    void physicallyDeleteBaseCautionaryLesson(String baseCautionaryLessonIds);

    /**
     * 其他业务模块调用，保存警示信息
     * @param tenantId
     * @param source 警示来源 1:事故管理 2：违章记分 3：隐患上报 4：安全检查
     * @param sourceId 业务数据主键id
     * @param sourceTitle 标题
     * @param cautionDeptId 需警示部门id
     * @param cautionDeptName 需警示部门名称
     * @param createBy 创建人
     */
    FebsResponse saveCautionaryLessonFromOthers(String tenantId, String source, String sourceId, String sourceTitle, String cautionDeptId, String cautionDeptName, String createBy);

}
